<template>
    <view>
        <video
            id="myVideo"
            class="content"
            object-fit="fill"
            :enable-play-gesture="false"
            :enable-progress-gesture="false"
            :show-loading="false"
            :show-center-play-btn="false"
            src="https://error.cool:9000/blog/2023-10-10/login-video2.mp4"
            :autoplay="true"
            :loop="true"
            :controls="false"
        >
            <cover-view class="xz-title" style="">
                飞尔是一场技术革命，也是一场认知革命。
            </cover-view>
        </video>
    </view>
</template>

<script setup lang="ts">
    import { onShow } from '@dcloudio/uni-app';
    import { getShowWxMiniApp } from '@/api/chatgpt';
    import { ref } from 'vue';
    const showChat = ref(false);
    onShow(async () => {
        const res = await getShowWxMiniApp();
        showChat.value = res.data;
        setTimeout(() => {
            if (showChat.value) {
                uni.switchTab({
                    url: '/pages/chat/chat'
                });
            }
        }, 1000);
    });
</script>

<style scoped>
    .content {
        width: 750rpx;
        height: 100%;
        /* z-index: 9; */
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background-color: #007aff;
    }
    .xz-title {
        width: 600rpx;
        height: 90rpx;
        position: fixed;
        bottom: 400rpx;
        margin-left: 40rpx;
        border-radius: 12rpx;
        line-height: 90rpx;
        color: #ededed;
        font-size: 30rpx;
        /* text-shadow: 5px 5px 5px #FF0000; */
    }
    .xz-button-1 {
        width: 250rpx;
        height: 90rpx;
        position: fixed;
        bottom: 305rpx;
        margin-left: 40rpx;
        background-color: #ffffff;
        border-radius: 12rpx;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: 90rpx;
    }
    .xz-button-2 {
        width: 250rpx;
        height: 90rpx;
        position: fixed;
        bottom: 300rpx;
        margin-left: 320rpx;
        border: 4rpx solid #ffffff;
        border-radius: 12rpx;
        text-align: center;
        line-height: 90rpx;
        color: #ffffff;
    }
</style>
